import { createRouter, createWebHistory } from 'vue-router';
import MapViewer from '../components/MapViewer.vue'; // 确保路径正确
import Home from '../Home.vue'; // 确保路径正确

const routes = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home, // 主页组件
  // },
  {
    path: '/',
    name: 'Home',
    component: Home, // 主页组件
  },
  {
    path: '/map',
    name: 'Map',
    component: MapViewer,
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
